package com.hncc.dms.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hncc.dms.mapper.DmsRegistrationMapper;
import com.hncc.dms.domain.DmsRegistration;
import com.hncc.dms.service.IDmsRegistrationService;
import javax.annotation.Resource;

/**
 * 就诊(门诊)信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-09-04
 */
@Service
public class DmsRegistrationServiceImpl implements IDmsRegistrationService 
{
    @Resource
    private DmsRegistrationMapper dmsRegistrationMapper;

    /**
     * 查询就诊(门诊)信息
     * 
     * @param id 就诊(门诊)信息ID
     * @return 就诊(门诊)信息
     */
    @Override
    public DmsRegistration selectDmsRegistrationById(Long id)
    {
        return dmsRegistrationMapper.selectDmsRegistrationById(id);
    }

    /**
     * 查询就诊(门诊)信息列表
     * 
     * @param dmsRegistration 就诊(门诊)信息
     * @return 就诊(门诊)信息
     */
    @Override
    public List<DmsRegistration> selectDmsRegistrationList(DmsRegistration dmsRegistration)
    {
        return dmsRegistrationMapper.selectDmsRegistrationList(dmsRegistration);
    }

    /**
     * 新增就诊(门诊)信息
     * 
     * @param dmsRegistration 就诊(门诊)信息
     * @return 结果
     */
    @Override
    public int insertDmsRegistration(DmsRegistration dmsRegistration)
    {
        dmsRegistration.setCreateTime(DateUtils.getNowDate());
        return dmsRegistrationMapper.insertDmsRegistration(dmsRegistration);
    }

    /**
     * 修改就诊(门诊)信息
     * 
     * @param dmsRegistration 就诊(门诊)信息
     * @return 结果
     */
    @Override
    public int updateDmsRegistration(DmsRegistration dmsRegistration)
    {
        return dmsRegistrationMapper.updateDmsRegistration(dmsRegistration);
    }

    /**
     * 批量删除就诊(门诊)信息
     * 
     * @param ids 需要删除的就诊(门诊)信息ID
     * @return 结果
     */
    @Override
    public int deleteDmsRegistrationByIds(Long[] ids)
    {
        return dmsRegistrationMapper.deleteDmsRegistrationByIds(ids);
    }

    /**
     * 删除就诊(门诊)信息信息
     * 
     * @param id 就诊(门诊)信息ID
     * @return 结果
     */
    @Override
    public int deleteDmsRegistrationById(Long id)
    {
        return dmsRegistrationMapper.deleteDmsRegistrationById(id);
    }
}
